using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._EditingTools._Conflation
{
    /// <summary>
    /// <para>Align Features</para>
    /// <para>Identifies inconsistent portions of the input features against target features within a search distance and aligns them with the target features.</para>
    /// <para>识别输入要素与搜索距离内目标要素不一致的部分，并将它们与目标要素对齐。</para>
    /// </summary>    
    [DisplayName("Align Features")]
    public class AlignFeatures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AlignFeatures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>Input line or polygon features to be adjusted.</para>
        /// <para>要调整的输入线或面要素。</para>
        /// </param>
        /// <param name="_target_features">
        /// <para>Target Features</para>
        /// <para>Input lines or polygons as target features.</para>
        /// <para>输入线或面作为目标要素。</para>
        /// </param>
        /// <param name="_search_distance">
        /// <para>Search Distance</para>
        /// <para>The distance used to search for match candidates. A distance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.</para>
        /// <para>用于搜索匹配候选项的距离。必须指定距离，并且该距离必须大于零。您可以选择首选单位;默认值为要素单位。</para>
        /// </param>
        public AlignFeatures(object _in_features, object _target_features, string? _search_distance)
        {
            this._in_features = _in_features;
            this._target_features = _target_features;
            this._search_distance = _search_distance;
        }
        public override string ToolboxName => "Editing Tools";

        public override string ToolName => "Align Features";

        public override string CallName => "edit.AlignFeatures";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _target_features, _search_distance, _match_fields, _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>Input line or polygon features to be adjusted.</para>
        /// <para>要调整的输入线或面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Target Features</para>
        /// <para>Input lines or polygons as target features.</para>
        /// <para>输入线或面作为目标要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_features { get; set; }


        /// <summary>
        /// <para>Search Distance</para>
        /// <para>The distance used to search for match candidates. A distance must be specified and it must be greater than zero. You can choose a preferred unit; the default is the feature unit.</para>
        /// <para>用于搜索匹配候选项的距离。必须指定距离，并且该距离必须大于零。您可以选择首选单位;默认值为要素单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public string? _search_distance { get; set; }


        /// <summary>
        /// <para>Match Fields</para>
        /// <para>Fields from input and target features. If specified, each pair of fields are checked for match candidates to help determine the right match.</para>
        /// <para>输入要素和目标要素中的字段。如果指定，则会检查每对字段的匹配候选项，以帮助确定正确的匹配项。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Match Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _match_fields { get; set; } = null;


        /// <summary>
        /// <para>Output Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public AlignFeatures SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}